
<div class="indexWidth">
    <button type="button" class="btn btn-info mainButtonRight"><a
            href="javascript:takeout.openMenu('${ctxPath!}/blessword/list?cid=${categoryid!}', null)" class="mianAcolor">返回</a></button>

    <div class="sectionTitle">
        祝福语管理
        <hr>
    </div>
<form id="newsForm" name="form1" action="${ctxPath!}/blessword/save?cid=${categoryid!}" method="POST" class="form-horizontal" enctype="multipart/form-data">
    <input type="hidden" id="id" name="blessword.id" value="${blessword.id!}"/>
    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">节日类型：</label>
        <#oneToManyTag val="${blessword.festivaltype!}" type="select" table="category" columnName="name" class="mainSetWidth"
                pname="blessword.festivaltype" defaultNumber="1" whereSel="parentid" whereArgs="7"></#oneToManyTag>
    </div>
    <!--<div class="articleInputAutoHeight">-->
        <!--<label class="mainSetConsistentWidth">内容：</label>-->
        <!--<input type="text" id="According" name="blessword.word" class="mainSetWidth" value="${blessword.word!}" placeholder=""  valid="vtext" validname="祝福语类型"/>-->
    <!--</div>-->

    <div class="articleFormLabel">
        <label class="mainSetConsistentWidth">祝福语内容：</label>
        <!--<div id="content">${news.content!}</div>
        <textarea id="news_content" rows="12" name="news.content" class="mainSetWidth">${news.content!}</textarea>-->
        <textarea name="blessword.word" id="blessword.word"  placeholder="新增时，多个祝福语用回车行分隔，可以同时上传多个祝福语" style="width:800px;height:400px;  ">${blessword.word!}</textarea>
    </div>
    <div class="form-group">
        <button style="margin-left: 100px;width:95px;" class="btn btn-info articleFormButton" type="button"
                onclick="oper.save()">保存
        </button>
    </div>

    <script type="text/javascript">
        function nan(t){
            t.value=t.value.replace(/[^\d]/g,"");
        }
        var oper = {
            save:function(){
                if(!validForm()) {
                    return false;
                }
                takeout.ajaxFormMainPanel('newsForm')
                return true;
            }
        };
    </script>
    <script>
        KindEditor.ready(function(K) {
            window.editor = K.create('#news_content', {
                afterCreate: function () {
                    var self = this;
                    K.ctrl(document, 13, function () {
                        self.sync();
                        K('form[name=form1]')[0].submit();
                    });
                    K.ctrl(self.edit.doc, 13, function () {
                        self.sync();
                        K('form[name=form1]')[0].submit();
                    });
                },
                afterBlur: function () { this.sync(); },
                allowImageUpload : true,
                uploadJson : '${ctxPath!}/news/uplodImg'
            });
        });
    </script>
</form>